<?php
	require "../dao/teacher_dao.php";
	
	$tname = $_POST['tname'];
	$tnumber = $_POST['tnumber'];
	
	$teacher = selectTeaByNameAndPass($tname, $tnumber);
	if($teacher){
		session_start();
		$_SESSION['teacher'] = $teacher;
		header("location:Teacher.php");
	}else{
?>
		<script>
			alert("登陆失败，请输入正确的信息");
			location.href = "T_login.php";
		</script>
<?php
	}
?>